﻿using System;
using System.Collections.ObjectModel;

namespace PoolKit
{
    internal interface IResourceCollectionUsageTracking<TResource> : IResourceCollection<TResource>
        where TResource : class
    {
        /// <summary>
        /// </summary>
        /// <param name="minumumResourceIdleTime"></param>
        /// <returns></returns>
        /// <exception cref="ArgumentOutOfRangeException"></exception>
        /// <exception cref="ObjectDisposedException"></exception>
        ReadOnlyCollection<TResource> GetResourcesSittingIdle(TimeSpan minumumResourceIdleTime);

        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        /// <exception cref="ResourceCollectionEmptyException"></exception>
        /// <exception cref="ObjectDisposedException"></exception>
        TimeSpan GetMaxResourceIdleTime();
    }
}